/**
 * @file 评价列表配置
 * @author yangjiangming <449654337@qq.com>
 * @date 2019/01/15 16:18:52
 */

layui.extend({
    oms_common_table_config: 'common/zmn.oms.common.table.config'
}).define(['oms_common_table_config'], function (exports) {

    var tableConfigObj = layui.oms_common_table_config;
    var tableConfig = tableConfigObj.createTableConfig('workComment');

    var operateIdEnum = {
        home: 103
    };

    var operateConfig = {
        moduleId: 570,
        primaryKey: 'orderId',
        fields: ['workId', 'orderId'],
        sysBaseURL: OMS_BASE_URL,
        operateListURL: '/work/operate/all/permission.action',
        operateObjectURL: '/work/operate/one/permission.action',
        operationList: [
            { id: 13, name: '回访', special: false, url: '/work/modify/reply/visit.action' },
            { id: 504, name: '评价备注', special: false, url: '/order_comment/modify/remark.action' },
            { id: 103, name: '详情', url: '/order_comment/modify/detail.action' },
        ],
        url: {
        },
        operateIdEnum: operateIdEnum,
        ui: {
            header: true,
            preAndNext: true
        },
        end: function () {
            window.updateRowDataByWorkId();
        },
        specialHandler: function () {
        },
        paramsParser: function (rowData) {
            return {
                orderId: rowData.orderId,
                workId: rowData.orderId
            };
        }
    };

    exports('oms_comment_config', {
        tableConfig: tableConfig,
        operateConfig: operateConfig
    });
});
